import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    loginState: localStorage.getItem('loginState') == 'true',
    userid:localStorage.getItem('userid'),
    token:localStorage.getItem('token'),
    seachval:'',//搜索框的值
    seachss:{},//搜索热门
    proList:[],//搜索列表，
    citymap:"",//地区值
    
  },
  mutations: {
    changeLoginState(state, value){
      state.loginState = value
    },
    userids(state, value){
      state.userid = value
    },
    tokens(state, value){
      state.token = value
      console.log(value);
    },
    seachval(state, value){
      state.seachval = value
    },
    seachss1(state,value){
      state.seachss = value
    },
    proList1(state,value){
      state.seachss = value
    },
    citymaps(state, value){
      state.citymap = value
    },
    

  },
  actions: {

  },
  getters: {
  }
})
